﻿<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net" xmlns:nv="http://www.springframework.net/nvelocity">

  <!--nv:engine id="velocityEngine">
    <nv:nvelocity-properties>
      <entry key="velocimacro.permissions.allow.inline.to.replace.global"  value="true"/>
			<entry key="velocimacro.library.autoreload" value="false"/>
    </nv:nvelocity-properties>
		<nv:resource-loader>
			<nv:custom name="mvcResourceLoader" type="Yawf.Web.Managers.MVCResourceLoader, Yawf.Web"
					description="MVC Resource Loader"
					path="./"/>
		</nv:resource-loader>
	</nv:engine-->

	<object id="viewManger" type="Yawf.Web.Managers.FreemarkerViewManager, Yawf.Web" init-method="Configure">
    <property name="TemplateLoader">
      <object type="Yawf.Web.Managers.FreemarkerViewLoader, Yawf.Web" />
    </property>
    <property name="ObjectWrapper">
      <object type="Freemarker.Net.NetObjectWrapper, Freemarker.Net" />
    </property>
    <property name="TagSyntax" value="2" />
	</object>

	<object id="methodInvoker" type="Yawf.Web.Managers.Modules.MethodInvokeModule, Yawf.Web" >
		<property name="ClassPaths">
			<list element-type="System.String">
				<value>Yawf.Web.Managers.Entities</value>
			</list>
		</property>
	</object>

	<object id="authenticateModule" type="Yawf.Web.Managers.Modules.AuthenticateModule, Yawf.Web">
		<property name="Manager" ref="authenticationManager"/>
	</object>

	<object id="modelManager" type="Yawf.Web.Managers.ModuleModelManager, Yawf.Web">
		<property name="Modules">
			<dictionary key-type="System.String" value-type="Yawf.Web.Managers.Modules.IModule, Yawf.Web">
				<entry key="method-invoke" value-ref="methodInvoker"/>
				<entry key="authenticate" value-ref="authenticateModule"/>
			</dictionary>
		</property>
	</object>

	<object id="errorManger" type="Yawf.Web.Managers.SimpleErrorManager, Yawf.Web">
		<property name="ViewManager" ref="viewManger"/>
		<property name="ErrorResource" value="~/error.xml"/>
		<property name="AccessDeniedResource" value="~/access_denied.xml"/>
	</object>

	<object id="mvcController" type="Yawf.Web.HttpHandlers.MVCController, Yawf.Web">
		<property name="AuthenticationManager" ref="authenticationManager"/>
		<property name="ModelManager" ref="modelManager"/>
		<property name="ViewManager" ref="viewManger"/>
		<property name="ErrorManager" ref="errorManger"/>
	</object>
	
</objects>
